﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using My.SharePoint.STSADM.Commands.OperationHelpers;
using IdeasFree.SharePoint.StsAdm.Commands.Helpers;

namespace IdeasFree.SharePoint.StsAdm.Commands
{
    /// <summary>
    /// StsAdm extensions : CopyFarmAppBinContent
    /// Parameters in     : n\a
    /// Command sample    : stsadm -o copyfarmappbincontent
    /// 
    /// </summary>
    public class CopyFarmAppBinContent:SPOperation
    {
        public CopyFarmAppBinContent()
        {
            SPParamCollection parameters = new SPParamCollection();

            StringBuilder sb = new StringBuilder();
            sb.Append("\r\nSchedule a job to deploy resources, and any appbincontent across web farm.");           
            Init(parameters, sb.ToString());
        }
        public override int Execute(string command, System.Collections.Specialized.StringDictionary keyValues, out string output)
        {
            output = "";
            Operation.DeployFarmBinContent(Params, keyValues);
            return 0;            
        }

        public override string GetHelpMessage(string command)
        {
            return HelpMessage;
        }
    }
}
